<%@page import="java.util.HashMap"%>
<%@page import="domain.Member"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%
  String [] names = {"김철수","박영수","이영희", "최순이"};
  int [] ages = {20,30,40};
  request.setAttribute("names",names);
  request.setAttribute("ages", ages);
  
  ArrayList list = new ArrayList();
  list.add("one");//String
  list.add(30);//integer
  list.add(new Member("id-id", "pwd", "이철수", "lee@abc.com"));//Member
  session.setAttribute("list", list);
  
  HashMap map = new HashMap();
  map.put("name", "tv");
  map.put("maker", "LG");
  map.put("price", "20000");
  request.setAttribute("product",map);
  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h2>EL을 이용행 Collection의 값들 출력</h2>

<h3>배열</h3>
${requestScope.names[0] }, ${requestScope.names[1] }, ${requestScope.names[2] }, ${requestScope.names[3] }<br>
${requestScope.ages[0] }, ${requestScope.ages[1] }, ${requestScope.ages[2] }<br>

<h3>List</h3>
${sessionScope.list[0] }, ${sessionScope.list[1] },<br>
${sessionScope.list[2].id }<br>
${sessionScope.list[2].name }<br>
${sessionScope.list[2].password }<br>
${sessionScope.list[2].email }<br>

<h3>Map</h3>
${requestScope.product.name } - ${requestScope.product["name"] } - ${request. }<br>
${requestScope.product.maker } - ${requestScope.product["maker"] }<br>
${requestScope.product.price } - ${requestScope.product["price"] }<br>
</body>
</html>